package com.wangjiacai.hqlQuery.role.service.impl;

import com.wangjiacai.hqlQuery.role.service.TokenUserService;
import com.wangjiacai.utils.web.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;

public class DefaultTokenUserService implements TokenUserService {

    @Autowired
    private RedisService redisService;

    @Override
    public String findUserId(String token) {
        return redisService.get(token);
    }

    @Override
    public <T> T findUserCredentials(String token, Class<T> returnType) {
        return redisService.get(token,returnType);
    }
}
